package com.todo.strategy.online.infrastructure.repository;

import com.todo.common.common.entity.response.page.PageResult;
import com.todo.strategy.online.infrastructure.entity.condition.PlanSetCondition;
import com.todo.strategy.online.infrastructure.entity.po.PlanSetPO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * (PlanSet)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 21:10:04
 */
public interface PlanSetRepository {

    /**
     * 根据主键id删除清单计划
     *
     * @param id
     * @return
     */
    Boolean removePlanSetPOById(Long id);

    /**
     * 根据主键id查询清单计划信息
     *
     * @param id
     * @return
     */
    PlanSetPO queryPlanSetPOById(Long id);

    /**
     * 新增清单计划信息
     *
     * @param planSetPO
     * @return
     */
    Boolean insertPlanSetPO(PlanSetPO planSetPO);

    /**
     * 根据主键id更新清单计划信息
     *
     * @param planSetPO
     * @return
     */
    Boolean updatePlanSetPOById(PlanSetPO planSetPO);

    /**
     * 多条件查询清单计划信息列表
     *
     * @param planSetCondition
     * @return
     */
    PageResult<PlanSetPO> queryPlanSetPOByCondition(PlanSetCondition planSetCondition);

    /**
     * 多条件查询清单计划信息列表数量
     *
     * @param planSetCondition
     * @return
     */
    Long queryCountByCondition(PlanSetCondition planSetCondition);

    /**
     * 根据用户和标题查询计划清单
     *
     * @param userId
     * @param title
     * @return
     */
    PlanSetPO queryPlanSetByUserAndTitle(Long userId, String title);

    /**
     * 根据用户id查询对应清单计划
     *
     * @param userId
     * @return
     */
    List<PlanSetPO> queryPlanSetPOByUserId(Long userId);

    /**
     * 根据用户id和计划id列表删除清单计划
     *
     * @param userId
     * @param planIdList
     * @return
     */
    Boolean removePlanSetByIdList(Long userId, List<String> planIdList);

    /**
     * 根据用户id和计划id列表查询清单计划
     *
     * @param userId
     * @param startTime
     * @param endTime
     * @return
     */
    List<PlanSetPO> queryPlanSetListByTime(Long userId, LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 根据id列表查询清单计划
     *
     * @param planIdList
     * @return
     */
    List<PlanSetPO> queryPlanSetByIdList(List<Long> planIdList);
}
